package com.lh.xml;

import com.lh.process.engine.ProcessEngine;
import com.lh.process.engine.config.ClassPathXmlProcessParser;
import com.lh.process.engine.context.ProcessContext;

/**
 * @author: linghao
 * @since: 2022/10/18
 */
public class XmlApplication {

    public static void main(String[] args) throws Exception {
        usingClasspathXmlProcessParser();
        // usingStringXmlProcessParser();
    }

    private static void usingClasspathXmlProcessParser() throws Exception {
        ProcessEngine processEngine = new ProcessEngine(new ClassPathXmlProcessParser("process-demo.xml"));
        ProcessContext process1 = processEngine.getContext("process-async");
        process1.set("nextId", "node4");
        process1.start();
    }
}
